<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height border-hover-style"  :class="{ 'outline-parent-zsj': getId() == 615265577537605 && props.indexs===0}">
    <div class="Showroom-parent" v-if="props.info.digitalShowroom">
      <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
    </div>
    <img
      class="outline-parent-bg"
      :src="publicUrls + 'free/style11/Level1outlineStyle4Bg.webp'"
      alt=""
    />
    <div class="outline jy-style-height">
      <div class="outline-content">
        <img
          v-if="props.info.value"
          @click="ImgVisible = true"
          :src="urls + props.info.value + '?imageView2/3/format/webp'"
          alt=""
        />
      </div>
    </div>
    <img class="shadow" :src="publicUrls + 'free/style11/firstLevelOutline1Shadow.webp'" alt="" />
    <IpImage :index="props.indexs" />
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free11Style4',
});
</script>

<script setup lang="ts">
import ExpandableText from './../../../textMode/ExpandableText.vue';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style11.vue';
import { publicUrls } from '@/utils/minxin';
import { getTextHtml } from '@/utils/minxin';
import { urls } from '@/utils/request/upload';
import { defineComponent, nextTick, ref } from 'vue';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { useProjectStore } from '@/store';
import { useRoute } from 'vue-router';
import getId from '@/utils/getId';
import IpImage from './IpImage.vue';
const store = useProjectStore();
const ImgVisible = ref(false);
const route = useRoute();

const props = defineProps({
  info: {
    type: Object,
  },
  indexs: {
    type: Number,
  },
  domShow: {
    type: Boolean,
  },
});
// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
// 打开IP弹窗
const openIp = (indexs: number) => {
  store.setCustomDialogShow(true, indexs);
};
</script>

<style scoped lang="less">
.outline-parent {
  position: relative;
  margin-top: 0;
  margin-right: 280px;
  .shadow {
    width: 235px;
    height: 250px;
    position: absolute;
    bottom: 0;
    right: -235px;
  }
}
.outline-parent-zsj {
  margin-right: 880px;
}
.IPimage {
  width: 125px;
  height: 120px;
  position: absolute;
  bottom: 0;
  right: -80px;
  z-index: 666;
  // animation: ip-anim 3s linear infinite;
  .IPBox {
    width: 100%;
    height: 100%;
    position: relative;
    .IPImg {
      width: 125px;
      height: 121px;
    }
    .IPhand {
      width: 43px;
      height: 46px;
      position: absolute;
      left: -34px;
      top: 50%;
      transform-origin: right center;
      animation: ip-rotate 2s linear infinite;
    }
  }
}
@keyframes ip-anim {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes ip-rotate {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  50% {
    transform: translateY(-50%) rotate(20deg);
  }
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
}
.outline-parent-bg {
  width: 576px;
  height: 100%;
}
.Showroom-parent {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 21;
}
.outline {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  .outline-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 15px 31.5px 172px 27px;
    display: flex;
    align-items: end;
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #b4cce8;
    }
  }
}
</style>